#!/usr/bin/env node

const http = require('http');



http.createServer((req,res)=>{

    if(req.url === '/') {
       req.pipe(process.stdout);
       res.end('ok');
            
    } else {
          res.statusCode = 404;
              res.setHeader('Content-Type', 'text/plain');
                  res.end('Resource not found!');
                    
    }

}).listen(8080);
